{extend name="base/index"/}
{block name="page_location"}
<div class="row">
	<div class="col-12">
		<div class="page-title-box">
			<div class="page-title-right">
				<ol class="breadcrumb m-0">
					<li class="breadcrumb-item"><a href="{:url('index/index')}">管理中心</a></li>
					<li class="breadcrumb-item active"><i class="iconfont icon-angle-right"></i>数据库备份/还原管理</li>
				</ol>
			</div>
			<h4 class="page-title">
				数据库备份/还原管理
			</h4>
		</div>
	</div>
</div>

{/block}
{block name="body"}
<div class="row" id="database_page">
	<div class="col-12">
        <div class="opt_box">
            <form class="form-inline" style="margin-bottom:10px;">			
                <a href="javascript:;" class="btn btn-success btn-sm ml-3" id="new_backup_btn">创建新的备份</a>
                <a href="javascript:;" class="btn btn-danger btn-sm ml-3" id="clear_database_btn">清空所有业务数据</a>
            </form>				
        </div>
		<div class="card">
			<div class="card-body">
            <form action="" method="post" id="member_list_frm">
                    <table class="table table-hover">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>备份文件名称</th>
                                <th>文件大小</th>
                                <th>创建时间</th>
                                <th>修改时间</th>
                                <th>最后一次访问时间</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            {volist name="new_list" id="data"}
                            <tr>
                                <td>{$key+1}</td>
                                <td>{$data.basename}
                                    {eq name="$data.basename" value="base.bak"}
                                    <span class="badge badge-danger">模板数据库</span>
                                    {/eq}
                                </td>
                                <td>{$data.filesize}</td>
                                <td>{$data.filectime}</td>
                                <td>{$data.filemtime}</td>
                                <td>{$data.fileatime}</td>
                                <td>
                                    {neq name="$data.basename" value="base.bak"}
                                    <a href="javascript:;" class="btn btn-primary btn-sm set_temp_btn" attr-filename="{$data.basename}"><i class="iconfont icon-icon_compile"></i> 设置为模板</a>
                                    {/neq}
                                    <a href="javascript:;" class="btn btn-primary btn-sm recover_btn" attr-filename="{$data.basename}"><i class="iconfont icon-icon_compile"></i> 立即恢复</a>
                                    {neq name="$data.basename" value="base.bak"}
                                    <a href="javascript:;" class="btn btn-danger btn-sm deletefile_btn" attr-filename="{$data.basename}"><i class="iconfont icon-icon_delete_fill"></i> 删除</a>
                                    {/neq}
                                </td>
                            </tr>
                            {/volist}
                        </tbody>
                    </table>
                </form>				
			</div>
		</div>
	</div>
</div>
{/block}
{block name="modal_dig"}

{/block}
{block name="script"}

{/block}